﻿using System.Windows;
using AzureDiagMon.Common;
using AzureDiagMon.Common.Helpers;
using AzureDiagMon.Common.Mvvm.Helpers;
using AzureDiagMon.ViewModels;

namespace AzureDiagMon.Views
{
    /// <summary>
    /// Interaction logic for MainWindow.xaml
    /// </summary>
    public partial class Main : Window
    {
        /// <summary>
        /// Initializes a new instance of the MainWindow class.
        /// </summary>
        public Main()
        {
            InitializeComponent();
            Closing += (s, e) => ViewModelLocator.Cleanup();
        }

        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            DataContext = IoC.Get<MainViewModel>();
        }
    }
}